package com.sumainfor.pc.market.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.TcmktownerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * 租客端租客成为业主
 */
@Controller
@RequestMapping("/tenant/key/TcmktownerContorller")
public class TcmktownerContorller {

    Logger log = LoggerFactory.getLogger(TcmktownerContorller.class);// 日志

    @Autowired
    TcmktownerService tcmktownerService;

    /**
     * 新增业主
     * @param params
     * @return
     */
    @ResponseBody
    @PostMapping("/AddCommunity")
    public JsonResult AddCommunity(@RequestBody Map<String,Object> params){

        log.info("params======>"+params);
        return tcmktownerService.AddCommunity(params);
    }
    @ResponseBody
    @PostMapping("/getHousingInfoState")
    public JsonResult getHousingInfoState(@RequestBody List<Map<String, Object>> params){

        log.info("params======>"+params);
        return tcmktownerService.getHousingInfoState(params);
    }

}
